package org.lvgo.factory.simple;

/**
 * @author lvgo
 * @version 1.0
 * @Description: 汽车工厂
 * @date 18-8-24 下午4:55
 */
public class CarFactory {

    public static Car getCar(CarBrand carBrand) {
        Car car = null;
        if (carBrand.equals(CarBrand.Audi)) {
            car = new Audi();
        } else if (carBrand.equals(CarBrand.BWM)) {
            car = new BMW();
        } else if (carBrand.equals(CarBrand.Mercedes)) {
            car = new Mercedes();
        }
        return car;
    }
}
